import type { LoginParams } from '@/types/login'
import type { MemberInfo } from '@/types/member'
import { http } from '@/utils/http'

// 登录
export const loginApp = (data: LoginParams) => {
  return http({
    method: 'POST',
    url: '/login/wxMin',
    data,
  })
}

// 模拟登录
export const mockLogin = (phoneNumber: string) => {
  return http<MemberInfo>({
    method: 'POST',
    url: '/login/wxMin/simple',
    data: { phoneNumber },
  })
}
